<template>
  <view class="conten">
    <view class="guide"  v-if="guideStatus">
      <image mode="widthFix" src="https://jinlin-airobot.oss-cn-shenzhen.aliyuncs.com/host/app_static/curriculum/zhiying.jpg"></image>
    </view>
    <view v-if="!isiOS && !guideStatus" class="login-hint-box">
      <view class="hint-downlod">
        <view class="login-img"><image src="https://jinlin-airobot.oss-cn-shenzhen.aliyuncs.com/host/app_static/addwx/logo.png"/></view>
        <view class="conter">您正在官方下载<text style="font-weight: bold;font-size: 32rpx;">《大爆炸思维》</text>，部份手机可能会因为浏览器提示有风险，您选择信任即可。</view>
      </view>
    </view>
  </view>
</template>

<script>
  export default {
  	data() {
  		return {
        guideStatus: false,
        isAndroid:'',
        isiOS:''
      }
    },
    onLoad() {
      this.promptlyGet()
      this.$wechat.unseBehavior()
    },
    onReady() {},
    methods:{
      // 下载app
      promptlyGet() {
        if (this.$wechat.isWechat()) {
          this.guideStatus = true
        }else{
          let u = navigator.userAgent
          this.isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1
          this.isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)
          if(this.isiOS){
             window.location.href = 'https://apps.apple.com/cn/app/%E5%A4%A7%E7%88%86%E7%82%B8%E6%80%9D%E7%BB%B4/id1601003988'
          }else {
            window.location.href = 'https://openapi.jinlinjishu.com/blob/download/dbz100-app'
          }
        }
      }
    }
  }
</script>

<style lang="scss" scoped>
  .guide{
    width: 100%;
    height: 100vh;
  }
  .login-hint-box{
    padding-top: 20%;
    height: 100vh;
    background: #B1B1B1;
    .hint-downlod{
      width: 680rpx;
      height: 200rpx;
      background: #E7F8FF;
      border-radius: 20rpx;
      margin: auto;
      padding: 40rpx;
      display: flex;
      align-items: center;
      .login-img{
        width: 120rpx;
        height: 120rpx;
      }
      .conter{
        width: 75%;
        margin-left: 20rpx;
        font-size: 30rpx;
        color: red;
      }
    }
  }
</style>

